﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Pool_Add.aspx.cs" Inherits="Admin_Form_Pool_Add" MasterPageFile="/Admin/MasterPage.master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="content" runat="server">
    
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnAddAnswer">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lstTopicAnswer" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnRemoveAnswer">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lstTopicAnswer" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<fieldset>
<legend style="padding: 10px 20px 10px"><h3 style="color: #3333FF; font-size:large">Thêm mới câu hỏi</h3></legend>
    <div style="text-align:center; font-size:larger"><asp:Label runat="server" ID="Label1"> </asp:Label></div>
         

<input type="hidden" id="txtPoolTopicID" runat="server" />
        <table style="text-align:left; width: 800px">
            <tr style="display:none">
                <td>Nhóm Câu Hỏi</td>
                <td>
                <telerik:RadComboBox AppendDataBoundItems="true" CssClass="AdminList" AutoPostBack="true" runat="server" DataTextField="CategoryPageName" DataValueField="CategoryPageID" ID="cboCategoryPage">
                    <Items>
                        <telerik:RadComboBoxItem Text="Không Có Nhóm Cha" />
                    </Items>
                </telerik:RadComboBox></td>
            </tr>
                    
            <tr>
                <td>Nội Dung: </td>
                <td><asp:TextBox CssClass="AdminTextbox" runat="server" ID="txtTopicContent"></asp:TextBox></td>
                <td><asp:RequiredFieldValidator ErrorMessage="Bạn phải nhập nội dung câu hỏi" runat="server" ID="require1" ControlToValidate="txtTopicContent"></asp:RequiredFieldValidator></td>
            </tr>
            
             <tr>
                <td colspan="3">
                    <asp:CheckBox Text="Hoạt Động" ID="chkIsActive" runat="server" /> &nbsp;&nbsp;
                    <asp:CheckBox Text="Nổi Bật" ID="chkIsTypical" runat="server" /> &nbsp;&nbsp;
                </td>
            </tr>
            
            
            <tr>
                <td colspan="3">
                    <div>Danh sách câu trả lời: </div>
                    <table>
                        <tr>
                            <td>
                                <asp:ListBox ID="lstTopicAnswer" AutoPostBack="true" runat="server"></asp:ListBox>
                                <asp:Button ID="btnAddAnswer" Text="Thêm" runat="server" OnClick="AddAnswer" />
                                <asp:Button ID="btnRemoveAnswer" Text="Xóa" runat="server" OnClick="RemoveAnswer" />
                            </td>
                            <td>
                                <asp:TextBox ID="txtAnswer" runat="server" Text=""></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            
             <tr>
                <td colspan="3" align="center">
                    <asp:Button CssClass="AdminSaveButton" runat="server" ID="btnCreate" OnClick="btnCreate_Click" Text="Thêm Mới" />
                    <asp:Button CssClass="AdminCancelButton" runat="server" ID="btnReset" OnClick="btnReset_Click" CausesValidation="false" Text="Quay Lại" />            
                </td>
            </tr>
            
        </table>
        
        <asp:Label runat="server" CssClass="AdminMessage" ID="lblMessage"></asp:Label>
    
    </fieldset>
   </asp:Content>
